-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standalone autopilot update logic #3406
Standalone autopilot update logic #3406
Conversation
52c5be8
to
316e9fc
Compare
316e9fc
to
8624c3d
Compare
@@ -25,6 +25,7 @@ require ( | |||
github.com/hashicorp/terraform-exec v0.18.1 | |||
github.com/imdario/mergo v0.3.16 | |||
github.com/k0sproject/dig v0.2.0 | |||
github.com/k0sproject/version v0.3.1-0.20220411075111-0270bb85e7f8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's 0.4.1 which has version constraints like version.NewConstraint(">= v1.23.0+k0s.2").Check(k0sVersion)
limitations under the License. | ||
*/ | ||
|
||
package context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be annoying because either this or stdlib context needs to be imported with a name. Maybe something like apcontext
?
032ce8a
to
c1093cf
Compare
This PR introduces a fully standalone logic in autopilot to follow different update channels. The (upcoming) update server will host channels in this way: latest: 1.28.0 stable/v1.27: 1.27.x (what ever is the latest in 1.27 series) stable/v1.26: 1.26.x (what ever is the latest in 1.26 series) unstable/v1.28: 1.28.0-beta.1 (what ever is the latest pre release in 1.28) For each channel the update-server "protocol" is a simple yaml data: ```yaml channel: latest version: v5.6.7 downloadURLs: - arch: amd64 os: linux k0s: http://localhost/dist/k0s k0sSha: deadbeef airgapBundle: https://url.to.airgap/k0s-images-amd64.tgz airgapSha: deadbeef - arch: arm64 os: linux k0s: http://localhost/dist/k0s - arch: arm os: linux k0s: http://localhost/dist/k0s ``` Essentially this offers an easy way for users to either always follow the latest version or stay up-to-date with some specific minor version. Each time k0s checks for possible updates it sends some general cluster details to the update server to allow the server also to make some decicions which update to push. Following data is sent in HTTP Headers: ``` K0S_StorageType: etcd/kine K0S_ClusterID: uuid of kube-system NS K0S_ControlPlaneNodesCount: 3 K0S_WorkerData: base64 encoded json of worker node arch, OS type, container runtime type ``` On top of the autopilot functionality there's a common component that will check if there's updates available and notifies cluster admin via Event. This checker does not perform any real updates, it's just a convenience way to inform admins there's new versions available. Neither does this component perform any checks if there is already a autopilot UpdateConfig in place. Signed-off-by: Jussi Nummelin <[email protected]>
c1093cf
to
a542a86
Compare
Description
This PR introduces a fully standalone logic in autopilot to follow different update channels. The (upcoming) update server will host channels in this way:
For each channel the update-server "protocol" is a simple yaml data:
Essentially this offers an easy way for users to either always follow the latest version or stay up-to-date with some specific minor version.
Each time k0s checks for possible updates it sends some general cluster details to the update server to allow the server also to make some decisions which update to push. Following data is sent in HTTP Headers:
On top of the autopilot functionality there's a common component that will check if there's updates available and notifies cluster admin via Event. This checker does not perform any real updates, it's just a convenience way to inform admins there's new versions available. Neither does this component perform any checks if there is already a autopilot
UpdateConfig
in place.Type of change
How Has This Been Tested?
Checklist: